//
//  FilmCell.m
//  MPFindPart
//
//  Created by xalo on 16/5/6.
//  Copyright © 2016年 马鹏. All rights reserved.
//

#import "FilmCell.h"
#import <AFNetworking/AFNetworking.h>

@interface FilmCell ()
@property (weak, nonatomic) IBOutlet UILabel *descLabel;
@property (weak, nonatomic) IBOutlet UILabel *typeLabel;
@property (weak, nonatomic) IBOutlet UILabel *actLabel;

@property (weak, nonatomic) IBOutlet UILabel *dirLabel;
@property (weak, nonatomic) IBOutlet UILabel *yearLabel;

@property (weak, nonatomic) IBOutlet UILabel *titleLabel;

@property (weak, nonatomic) IBOutlet UIImageView *FilmImageView;

@end
@implementation FilmCell


- (void)setCellWithModel:(FilmModel *)model{
    
    NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"%@",model.cover]];
    NSData *data = [NSData dataWithContentsOfURL:url];
    self.FilmImageView.image = [UIImage imageWithData:data];
    self.titleLabel.text = model.title;
    self.dirLabel.text = [NSString stringWithFormat:@"导演:%@",model.dir];
    self.yearLabel.text = [NSString stringWithFormat:@"年份:%@",model.year];
    self.actLabel.text = [NSString stringWithFormat:@"主演:%@",model.act];
    self.typeLabel.text = [NSString stringWithFormat:@"类型:%@",model.tag];
    self.descLabel.text = model.desc;
    
}
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
